<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="paging" uri="paging-taglib" %>
<html>
<head>
    <title>店铺设置</title>
   <script>
    $("#form_submit").click(function(){
    //                alert("提交动作");
    $("#product_form").submit();
    });
    </script>
    </head>
<body>
<div class="navigation">
    <div class="crumbs ">
        <i class="tm-iconfont icon-info"></i>
        <a href="#">卖家中心</a><span>&gt;</span><a href="#200">营销中心</a><span>&gt;</span>会员管理
    </div>
    <div class="help">
        <a href="#" target="_blank">卖家交易学习专区</a>
    </div>
</div>
<div class="c oh">
<form:form  action="${ctx}/wx/lookup_user" id="product_form">
    <div class="u_tableform p-l10">
        <div class="item">
            <label class="label w60">会员名：</label>
            <div class="cont_txt">
                <input id="userName" name="userName" type="text" class="text w180 m-r10" />
                <button id="form_submit" class="i_btn u2 p-lr10">搜索会员</button>
            </div>
        </div>
    </div>
    </form:form>
    <div class="u_table_list table003 m-t20 line-all">
        <table>
            <colgroup>
                <col width="20%">
                <col width="40%">
                <col width="10%">
                <col width="15%">
                <col width="15%">
            </colgroup>
            <tr>
                <th>姓名</th>
                <th>所在省市</th>
                <th>订单数</th>
                <th>订单总额</th>
                <th>首次购买时间</th>
            </tr>
            <c:forEach var="item" items="${list}">
            <tr>
                <td class="tal">${item.userName}</td>
                <td class="tal not_lb">${item.addrCityName}</td>
                <td class="tal not_lb">${item.orderNumber}</td>
                <td class="tal not_lb"><fmt:formatNumber type="number" maxFractionDigits="4" minFractionDigits="4" value="${item.totalOrder}"></fmt:formatNumber></td>
                <td class="tal not_lb"><fmt:formatDate value="${item.firstbuytime}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
            </tr>
            </c:forEach>
            <c:forEach var="item" items="${wxShopUsers}">
            <tr>
                <td class="tal">${item.userName}</td>
                <td class="tal not_lb">${item.addrCityName}</td>
                <td class="tal not_lb">${item.orderNumber}</td>
                <td class="tal not_lb"><fmt:formatNumber type="number" maxFractionDigits="4" minFractionDigits="4" value="${item.totalOrder}"></fmt:formatNumber></td>
                <td class="tal not_lb"><fmt:formatDate value="${item.firstbuytime}" pattern="yyyy-MM-dd"></fmt:formatDate></td>
            </tr>
            </c:forEach>
        </table>
    </div>
    <div style="padding:20px; text-align:right;" class="pages">
        <ul>
            <paging:paging pageIndex="${pageIndex}" totalPage="${totalPage}" href="${ctx}/wx/shop_user"
                           htmlTag="li"></paging:paging>
        </ul>
    </div>
</div>
</body>
</html>
